<#assign pageTitle = "${article.title!}-${siteCompany.siteName!}" />
<#assign pageKeywords = "${article.title!},${siteCompany.siteName!}" />
<#assign pageDescription = "${article.intro!}" />
<#assign channelId = 4 />
<#assign pageHeader>
</#assign>
<#assign pageContent>
<div class="bg-fa of u-body">
	<section class="container">
		<section class="i-article">
			<section class="path-wrap txtOf hLh30">
				<a href="" title="首页" class="c-999 fsize14">首页</a>
				\
				<a href="/article/list.html" title="" class="c-999 fsize14">资讯列表</a>
				\ <span class="c-333 fsize14">${article.title }</span>
			</section>
			<div class="clearfix">
				<div class="fl w70">
					<section class="artil-list-box bg-fff">
						<article class="article-infor-box">
							<h3 class="hLh30 txtOf unFw" align="center">
								<span class="fsize20 c-333 f-fM">${article.title }</span>
							</h3>
							<section class="hLh20 mt20 pb10 mreadnum clearfix">
								<span class="fr">
									<em class="icon18 i-n-xqtime">&nbsp;</em>
									<tt class="c-999 f-fM">
										<!-- 1小时前发布 -->
										${timeBeforeChn!}
										<#--${article.updateTime ?datetime('yyyy-MM-dd hh:mm:ss')}-->
									</tt>
								</span>
								<span class="fl">
									<a class="mr30 c-999 f-fM" title="浏览">
										<em class="icon20 in-new-eyeico">&nbsp;</em>
										<span class="vam fsize12 c-master f-fM">${article.viewCount!0}</span>
									</a>
									<a class="noter-dy mr30 c-999 f-fM" title="评论" href="#commentContent">
										<em class="icon20">&nbsp;</em>
										<span id="commentCount" class="vam fsize12 c-master f-fM commentCount">${article.commentCount!0}</span>
									</a>
									<a class="noter-zan f-fM c-999" href="javascript: void(0);" title="赞一下" onclick="praiseArticle(${article.articleId})">
										<em class="icon20">&nbsp;</em>
										<span id="praiseCount" class="praiseCount vam c-master fsize12 f-fM">${article.praiseCount!0}</span>
									</a>
								</span>
							</section>
							<div id="art-infor-body">${content }
								<div class="fl">
									<span class="fsize20 fbold">网友评论</span>
								</div>
								<div class="fr">
									<a href="javascript:void(0)" onclick="praiseArticle(${article.articleId})"  title="点赞" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-primary">
										<i class="layui-icon layui-icon-heart"></i> 赞一下 <span class="praiseCount c-red">${article.praiseCount!0}</span>
									</a>
									<a href="javascript:void(0)" onclick="addComment(${article.articleId},1)" title="评论" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal">
										<i class="layui-icon layui-icon-chat"></i> 发表评论
									</a>
								</div>
							</div>
						</article>
						<!-- 文章评论 开始 -->
						<div class="mt15 mt15">
							<a id="commentContent"></a>
							<div id="comment-list">
								<section class="no-data-wrap">
									<em class="icon30 no-data-ico">&nbsp;</em>
									<span class="c-666 fsize14 ml10 vam">
										还没有评论，
										<a href="javascript:void(0)" onclick="addComment(${article.articleId},1)" title="评论" class="c-master">
											快来抢沙发吧...
										</a>
									</span>
								</section>
							</div>
							<!-- 公共分页 开始 -->
							<div id="comment-page"></div>
							<!-- 公共分页 结束 -->
						</div>
					</section>
				</div>
				<aside class="fl w30 articleRecommend">
					<div class="ml15 artil-list-box bg-fff">
						<header class="comm-title all-article-title new-a-tit-r">
							<h2 class="fl tac">
								<span class="c-333">资讯排行榜</span>
							</h2>
						</header>
						<section class="i-article-list r-art-wrap">
							<ul>
								<#if recommendList??>
									<#list recommendList as article>
										<li>
											<aside class="orderNum"><span>${article_index+1}</span></aside>
											<h3 class="hLh30 txtOf">
												<a href="/article/view/${article.articleId}.html" title="${article.title }" class="i-art-title">${article.title }</a>
											</h3>
										</li>
									</#list>
								</#if>
							</ul>
						</section>
					</div>
				</aside>
			</div>
			<div class="clear"></div>
		</section>
	</section>
	<!-- /资讯列表 结束 -->
</div>
	<script type="text/html" id="comment-template">
		{{#  if(d.length > 0){ }}
		<section class="question-list lh-bj-list pr">
			<ul>
				{{#  layui.each(d, function(index, item){ }}
				<li>
					<aside class="noter-pic">
						<img width="50" height="50" class="avatar" src="{{ item.avatar || '/static/qdxwx/img/avatar-boy.gif' }}">
					</aside>
					<div class="noter-txt mt5" id="comment-content-{{item.commentId}}">
						{{#  if(item.parent != null ){ }}
						<blockquote class="layui-elem-quote" style="padding: 5px 10px;">
							<div class="of mt5">
								<span class="fl fsize12 c-blue">
									引用：{{item.parent.userName}}
									&nbsp;&nbsp;
									<span class="fsize12 c-999 ml5">
										{{ layui.util.toDateString(item.parent.addTime, 'yyyy-MM-dd HH:mm:ss') }}
									</span>
								</span>
								<span class="fr fsize12 c-999 ml5">
									<a class="noter-dy" title="回复" onclick="replyComment('{{item.parent.commentId}}')">
										<em class="icon18">&nbsp;</em>
										<span class="c-blue">回复</span>
										(<span class="fsize12 c-master" id="reply_count_{{item.parent.commentId}}">{{item.parent.replyCount }}</span>)
									</a>
								</span>
							</div>
							<div>
								{{ item.parent.content }}
							</div>
						</blockquote>
						{{#  } }}
						<p>{{ item.content }}</p>
					</div>
					<div class="of mt5">
						<span class="fl fsize12 c-blue">
							{{item.userName}}
							&nbsp;&nbsp;
							<span class="fsize12 c-999 ml5">
								{{ layui.util.toDateString(item.addTime, 'yyyy-MM-dd HH:mm:ss') }}
							</span>
						</span>
						<span class="fr fsize12 c-999 ml5">
							<a class="noter-zan mr10" title="点赞" onclick="praiseComment('{{item.commentId}}')">
								<em class="icon18">&nbsp;</em>
								<span class="c-blue">点赞</span>
								(<span class="fsize12 c-master" id="praise_count_{{item.commentId}}">{{item.praiseCount }}</span>)
							</a>
							<a class="noter-dy" title="回复" onclick="replyComment('{{item.commentId}}')">
								<em class="icon18">&nbsp;</em>
								<span class="c-blue">回复</span>
								(<span class="fsize12 c-master" id="reply_count_{{item.commentId}}">{{item.replyCount }}</span>)
							</a>
						</span>
					</div>
				</li>
				{{#  }); }}
			</ul>
		</section>
		{{#  } }}
	</script>
</#assign>
<#assign pageFooter>
	<script type="text/javascript" src="/static/js/article/article-view.js?${vstamp!}"></script>
	<script type="text/javascript" src="/static/js/comment/comment.js?${vstamp!}"></script>
	<script type="text/javascript">
		var otherId = ${article.articleId};
		var params = {
			templateId: '#comment-template'
			, viewId: '#comment-list'
			, pageViewId: '#comment-page'
			, otherId: otherId
			, type: 1
			, pageSize : 8
			, page: 1
		}
		$(function () {
			//排行榜前3图标背景色
			$(".r-art-wrap>ul>li:lt(3)").addClass("lt2");

			scrollLoad(); //响应滚动加载课程图片
			//文章评论
			commentListInit(params);
			/*
			var options = {
				render: "canvas",
				height: 120,
				width: 120,
				correctLevel: 0,
				text: location.href.toString()
				//,src: '/static/favicon.ico'//这里配置Logo的地址即可。
			};
			try {
				$('#c-code-image').qrcode(options);
			} catch (e) {
				options.render = "table";
				$('#c-code-image').qrcode(options);
			}*/
		});
	</script>
</#assign>
<#include "../layouts/layout.ftl">